
#include "Stuff.h"
#include <utility>
#include <iostream>

using namespace npIterator;
using namespace std;


Stuff::Stuff() // : BaseClass()
{
    
}

Stuff::~Stuff()
{
    
}

Stuff::Stuff(const Stuff& cpy) // : BaseClass(cpy)
{
    this->toSay = cpy.toSay;
}

Stuff& Stuff::operator=(const Stuff& asn)
{
    if (this == &asn)
    {
        return *this;
    }
    else
    {
        // BaseClass::operator=(asn);
        
        //To do
        this->toSay = asn.toSay;
        
        return *this;
    }
}

Stuff::Stuff(Stuff&& mov) noexcept // : BaseClass(move(mov))
{
    this->toSay = move(mov.toSay);
}

Stuff& Stuff::operator=(Stuff&& mva) noexcept
{
    if (this == &mva)
    {
        return *this;
    }
    else
    {
        // BaseClass::operator=(move(mva));
        
        //To do
        this->toSay = move(mva.toSay);
        
        return *this;
    }
}

Stuff* Stuff::clone() const
{
    // return nullptr;
    return new Stuff(*this);
}

Stuff* Stuff::steal(void* sft)
{
    Stuff* shf = static_cast<Stuff*>(sft);
    if (this == shf)
    {
        return this;
    }
    else
    {
        if (!shf)
        {
            //new an instance if not abstract.
            shf = new Stuff();
        }
        
        // BaseClass::steal(shf);
        
        //To do
        shf->toSay = move(this->toSay);
        
        return shf;
    }
}

//other constructors
Stuff::Stuff(const string& toSay)
{
    this->toSay = toSay;
}

//public methods
void Stuff::say() const throw()
{
    cout << this->toSay << flush;
}

//protected methods

//private methods

//static part

//others
